package com.athengzhi.springCloud.controller;

import com.athengzhi.springCloud.entities.CommonResult;
import com.athengzhi.springCloud.entities.Payment;
import com.athengzhi.springCloud.service.PaymentFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Package: com.athengzhi.springCloud.controller
 * @ClassName: OrderOpenFeignController
 * @Author: lhz
 * @CreateTime: 2023/4/24 11:50
 * @Description:
 */
@RestController
public class OrderOpenFeignController {
    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping(value = "/consumer/payment/get/{id}")
    public CommonResult<Payment> getPayment(@PathVariable("id") Long id){
        return paymentFeignService.getPaymentById(id);
    }
}
